public class shui {
    public static void main(String[] args){
        int num,x,y,z;
        for (num = 100;num<1000;num++) {
            x = num % 10;
            y = (num - x) / 10 % 10;
            z = num / 100;
            if (num == x * x * x + y * y * y + z * z * z) {
                System.out.println(num);
            }
        }
    }
}
